<?php
/**
 * Created by PhpStorm.
 * User: qhzhyt
 * Date: 2018/10/10
 * Time: 16:33
 */


if (!isset($_GET['userId'])) {
    echo(json_encode(['status' => 0, 'code' => 2]));
    exit(1);
}

require_once '../conf/conf.php';

$user = $db->get('user', '*', ['user_id' => $_GET['userId']]);

if ($user == null) {
    echo(json_encode(['status' => 0, 'code' => 5]));
    exit(1);
}


echo(json_encode(['status' => 1, 'code' => 1, 'data' => $user]));
